package io.wmy.supex.modules.demo.service.impl;

import io.wmy.supex.modules.demo.mapper.UserMapper;
import io.wmy.supex.modules.demo.model.User;
import io.wmy.supex.modules.demo.service.IUserService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Set;

/**
 * Created by qiaoming on 2016/7/16.
 */
@Service
public class UserServiceImpl implements IUserService {

    private static final Logger logger = LoggerFactory.getLogger(UserServiceImpl.class);

    @Resource
    private UserMapper userMapper;

    @Cacheable(value = "user", key = "#id")
    @Override
    public User getUser(Integer id) {
        return userMapper.getOne(id);
    }

    @Override
    public Set<String> findRoles(String userName) {
        return null;
    }

    @Override
    public Set<String> findPermissions(String userName) {
        return null;
    }

    @Override
    public User findByUsername(String userName) {
        return null;
    }
}
